<h1>品牌列表</h1>

<table>
  <tr>
    <th>名称</th>
    <th>描述</th>
    <th>图片</th>
    <th>排序</th>
    <th>可用</th>
  </tr>

<% for brand in @brands %>
  <tr>
    <td><%=h brand.name %></td>
    <td><%=h brand.description %></td>
    <td><%= image_tag url_for_file_column(brand, "image_url","thumb") if brand.image_url %></td>
    <td><%=h brand.sort_order %></td>
    <td><%=h brand.active %></td>
    <td><%= link_to '编辑', edit_brand_path(brand) %></td>
    <td><%= link_to '删除', brand, :confirm => '确定删除?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New brand', new_brand_path %>
